package com.p04.homework;

public class Cat {
  /*
  属性： 编号 id
         name
         color
         sex
         age
   书写四个构造函数  分别给 cat对象赋值 练习 this()
   */
    public int id;
    public String name;
    public String color;
    public String sex;
    public int age;

    /**
     * 无参构造
     */
    public Cat(){

    };

    /**
     * 两个参数的构造
     * @param id
     * @param name
     */
    public Cat(int id,String name){
       this.id=id;
       this.name=name;
    };

    public Cat(int id,String name,String color){
       this(id,name);
       this.color = color;
    };

    public Cat(int id,String name,String color, String sex){
        this(id,name,color);
        this.sex = sex;
    };

    public Cat(int id,String name,String color, String sex,int age){
        this(id,name,color,sex);
        this.age = age;
    };




}
